Optimal. Leaf size=88 \[ \frac{x \left (8 a^2-4 a b+3 b^2\right )}{8 b^3}-\frac{a^{5/2} \tanh ^{-1}\left (\frac{\sqrt{a} \tanh (x)}{\sqrt{a+b}}\right )}{b^3 \sqrt{a+b}}-\frac{(4 a-3 b) \sinh (x) \cosh (x)}{8 b^2}+\frac{\sinh (x) \cosh ^3(x)}{4 b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.209898, antiderivative size = 88, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.4, Rules used = {3187, 470, 578, 522, 206, 208} \[ \frac{x \left (8 a^2-4 a b+3 b^2\right )}{8 b^3}-\frac{a^{5/2} \tanh ^{-1}\left (\frac{\sqrt{a} \tanh (x)}{\sqrt{a+b}}\right )}{b^3 \sqrt{a+b}}-\frac{(4 a-3 b) \sinh (x) \cosh (x)}{8 b^2}+\frac{\sinh (x) \cosh ^3(x)}{4 b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3187
Rule 470
Rule 578
Rule 522
Rule 206
Rule 208
Rubi steps
\begin{align*} \int \frac{\cosh ^6(x)}{a+b \cosh ^2(x)} \, dx &=-\operatorname{Subst}\left (\int \frac{x^6}{\left (1-x^2\right )^3 \left (a-(a+b) x^2\right )} \, dx,x,\coth (x)\right )\\ &=\frac{\cosh ^3(x) \sinh (x)}{4 b}-\frac{\operatorname{Subst}\left (\int \frac{x^2 \left (3 a+(a-3 b) x^2\right )}{\left (1-x^2\right )^2 \left (a+(-a-b) x^2\right )} \, dx,x,\coth (x)\right )}{4 b}\\ &=-\frac{(4 a-3 b) \cosh (x) \sinh (x)}{8 b^2}+\frac{\cosh ^3(x) \sinh (x)}{4 b}+\frac{\operatorname{Subst}\left (\int \frac{-a (4 a-3 b)+\left (-4 a^2+a b-3 b^2\right ) x^2}{\left (1-x^2\right ) \left (a+(-a-b) x^2\right )} \, dx,x,\coth (x)\right )}{8 b^2}\\ &=-\frac{(4 a-3 b) \cosh (x) \sinh (x)}{8 b^2}+\frac{\cosh ^3(x) \sinh (x)}{4 b}-\frac{a^3 \operatorname{Subst}\left (\int \frac{1}{a+(-a-b) x^2} \, dx,x,\coth (x)\right )}{b^3}+\frac{\left (8 a^2-4 a b+3 b^2\right ) \operatorname{Subst}\left (\int \frac{1}{1-x^2} \, dx,x,\coth (x)\right )}{8 b^3}\\ &=\frac{\left (8 a^2-4 a b+3 b^2\right ) x}{8 b^3}-\frac{a^{5/2} \tanh ^{-1}\left (\frac{\sqrt{a} \tanh (x)}{\sqrt{a+b}}\right )}{b^3 \sqrt{a+b}}-\frac{(4 a-3 b) \cosh (x) \sinh (x)}{8 b^2}+\frac{\cosh ^3(x) \sinh (x)}{4 b}\\ \end{align*}
Mathematica [A] time = 0.215353, size = 76, normalized size = 0.86 \[ \frac{4 x \left (8 a^2-4 a b+3 b^2\right )-\frac{32 a^{5/2} \tanh ^{-1}\left (\frac{\sqrt{a} \tanh (x)}{\sqrt{a+b}}\right )}{\sqrt{a+b}}-8 b (a-b) \sinh (2 x)+b^2 \sinh (4 x)}{32 b^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.037, size = 323, normalized size = 3.7 \begin{align*} -{\frac{1}{4\,b} \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) ^{-4}}+{\frac{1}{2\,b} \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) ^{-3}}-{\frac{a}{2\,{b}^{2}} \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) ^{-1}}+{\frac{5}{8\,b} \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) ^{-1}}-{\frac{7}{8\,b} \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) ^{-2}}+{\frac{a}{2\,{b}^{2}} \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) ^{-2}}+{\frac{{a}^{2}}{{b}^{3}}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) }-{\frac{a}{2\,{b}^{2}}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) }+{\frac{3}{8\,b}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) }-{\frac{1}{2\,{b}^{3}}{a}^{{\frac{5}{2}}}\ln \left ( \sqrt{a+b} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}+2\,\sqrt{a}\tanh \left ( x/2 \right ) +\sqrt{a+b} \right ){\frac{1}{\sqrt{a+b}}}}+{\frac{1}{2\,{b}^{3}}{a}^{{\frac{5}{2}}}\ln \left ( \sqrt{a+b} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}-2\,\sqrt{a}\tanh \left ( x/2 \right ) +\sqrt{a+b} \right ){\frac{1}{\sqrt{a+b}}}}+{\frac{1}{4\,b} \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) ^{-4}}+{\frac{1}{2\,b} \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) ^{-3}}-{\frac{a}{2\,{b}^{2}} \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) ^{-1}}+{\frac{5}{8\,b} \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) ^{-1}}+{\frac{7}{8\,b} \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) ^{-2}}-{\frac{a}{2\,{b}^{2}} \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) ^{-2}}-{\frac{{a}^{2}}{{b}^{3}}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) }+{\frac{a}{2\,{b}^{2}}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) }-{\frac{3}{8\,b}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.07442, size = 3320, normalized size = 37.73 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.19982, size = 203, normalized size = 2.31 \begin{align*} -\frac{a^{3} \arctan \left (\frac{b e^{\left (2 \, x\right )} + 2 \, a + b}{2 \, \sqrt{-a^{2} - a b}}\right )}{\sqrt{-a^{2} - a b} b^{3}} + \frac{b e^{\left (4 \, x\right )} - 8 \, a e^{\left (2 \, x\right )} + 8 \, b e^{\left (2 \, x\right )}}{64 \, b^{2}} + \frac{{\left (8 \, a^{2} - 4 \, a b + 3 \, b^{2}\right )} x}{8 \, b^{3}} - \frac{{\left (48 \, a^{2} e^{\left (4 \, x\right )} - 24 \, a b e^{\left (4 \, x\right )} + 18 \, b^{2} e^{\left (4 \, x\right )} - 8 \, a b e^{\left (2 \, x\right )} + 8 \, b^{2} e^{\left (2 \, x\right )} + b^{2}\right )} e^{\left (-4 \, x\right )}}{64 \, b^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]